<extend name="Public/base" />

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>{$title}</h2>
    </div>
    <div class="cf">
        <!-- 高级搜索 -->
        <div class="search-form fr cf">
            <div class="sleft">
            </div>
        </div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
        <table>
            <thead>
            <tr>
                <th>BIN</th>
                <th>商品名[规格]</th>
                <th>批次</th>
                <th>报损份额</th>
                <th>报损量</th>
                <th>入库量</th>
                <th>入库报损率</th>
                <th>出库量</th>
                <th>出库报损率</th>
                <th>库存量</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="_list">
                <volist name="_list" id="vo">
                    <tr>
                        <td>{$vo.BIN}</td>
                        <td>
                            {$vo.BIN|get_name_by_id=###,'Material_product','BIN','pname'}
                            [{$vo.BIN|get_name_by_id=###,'Material_product','BIN','spec'}]
                        </td>
                        <td>
                            <a href="{:U('batchdetail')}&warn_batch={$vo.warn_batch|substr=###,0,8}">
                            {$vo.warn_batch}
                            </a>
                        </td>
                        <td>{$vo.part}%</td>
                        <td>{$vo.cnt}</td>
                        <td>{$vo.in_cnt}</td>
                        <td>{$vo.loss_in}%</td>
                        <td>{$vo.out_cnt}</td>
                        <td>{$vo.loss_out}%</td>
                        <td>{$vo.inventory_cnt}</td>
                        <td>
                            <a href="{:U('lossproductdetail')}&warn_batch={$vo.warn_batch}&BIN={$vo.BIN}&day={:I('day')}" class="btn btn-success">报损原因</a>
                        </td>
                    </tr>
                </volist>
                <else/>
                <td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
            </tbody>
        </table>
    </div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
    <script type="text/javascript">
        highlight_subnav('{:U('Loss/index')}');
    </script>
</block>
